#ifndef TEXTSCROLLBARELEMENT_H_
#define TEXTSCROLLBARELEMENT_H_

#include "../Widget.h"
#include "../../common/utils/Logger.h"
#include "../../common/Constantes.h"

class TextScrollBarElement : public Widget {
public:
	TextScrollBarElement(int xPos, int yPos, Widget* parent, std::string text, int relY);

	virtual void handleEvent(Event event);

	virtual void resolve();

	virtual void showOn(SDL_Surface* surface);

	virtual ~TextScrollBarElement();


	void up();
	void down();
	void setFocus();
	void unsetFocus();
	void setYpos(int yPos);

	std::string getText();
	bool isFocused();
	bool isVisible();

private:
	TextScrollBarElement();

	std::string text;
	std::string path;
	bool selected;

	SDL_Surface* pressedSurface;
	SDL_Surface* defaultSurface;
	SDL_Surface* activeSurface;
	Widget* parent;

//TODO donde se setea?
	int maxVisibleY;
	int minVisibleY;

	void setCoordY();
};

#endif /* TEXTSCROLLBARELEMENT_H_ */
